package cn.scxy.bookcity.service.impl;

import cn.scxy.bookcity.ex.ServiceException;
import cn.scxy.bookcity.mapper.OrderoneMapper;
import cn.scxy.bookcity.mapper.OrdersMapper;
import cn.scxy.bookcity.pojo.dto.OrderOneAddNewDTO;
import cn.scxy.bookcity.pojo.entity.Orderone;
import cn.scxy.bookcity.pojo.entity.Orders;
import cn.scxy.bookcity.pojo.vo.OrdersoneListItemVO;
import cn.scxy.bookcity.service.IOrderoneService;
import cn.scxy.bookcity.service.IOrdersService;
import cn.scxy.bookcity.web.ServiceCode;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Slf4j
@Service
public class OrderoneServiceImpl implements IOrderoneService {
    @Autowired
    OrderoneMapper orderoneMapper;

    @Override
    public void insert(List<OrderOneAddNewDTO> orderOneAddNewDTO) {
       log.debug("开始处理【添加Orderone订单】的业务，参数：{}", orderOneAddNewDTO);
        log.debug("即将插入订单数据：{}", orderOneAddNewDTO);
        int rows = orderoneMapper.insert(orderOneAddNewDTO);
        log.debug("插入订单数据完成");
    }

    @Override
    public List<OrdersoneListItemVO> list() {
        return orderoneMapper.list();
    }
}
